package com.leetCode.easy;

/**
 * 自定义链表类
 */
public class ListNode {
    int val;
    ListNode next;
    ListNode(int x){val = x;}
}

class test{
    public static void main(String[] args) {
        ListNode head = new ListNode(0);
        ListNode firstNode = new ListNode(1);
        ListNode secondNode = new ListNode(2);
        ListNode thirdNode = new ListNode(3);
        head.val = 1;
        head.next = firstNode;
        firstNode.next = secondNode;
        secondNode.next = thirdNode;
        a(head);
    }

    private static void a(ListNode head) {
        System.out.println("secondNode的值为"+ head.next.next.val);
    }
}
